import Storage from "@/common/js/storage";
import state from "./state";
export default {
  setPageObject(state, data = {}) {
    state.pageObject = data;
  },

  setPageEdit(state, bool = false) {
    state.pageEdit = bool
  },
  setNetWorkStatus(state, bool = false) {
    state.netWorkStatus = bool;
    if (!bool) {
      uni.$emit("hideLoading");
      uni.stopPullDownRefresh();
    }
    console.log("netWorkStatus : ", bool)
  },
  setPageTitle(title = "") {
    state.pageTitle = title;
  },
  setCode(state, code) {
    state.code = code;
  }
}